<template>
  <div>
    <v-dialog>
      <div class="sure">
        <div class="no-check-address">
          <span @click="deleteSure"></span>
          <div class="wrap-text">
            <p>{{ alertText }}</p>
          </div>
          <button @click="deleteSure">{{ $t('message.confirm') }}</button>
        </div>
      </div>
    </v-dialog>
  </div>
</template>

<script>
import VDialog from './VDialog'
export default {
  data () {
    return {}
  },
  computed: {
    alertText () {
      return this.$store.state.alert.alertText || this.$t('message.errorMessage')
    }
  },
  methods: {
    deleteSure () {
      this.$store.commit('alert', {
        switch: false,
        alertText: ''
      })
    }
  },
  components: {
    VDialog
  }
}
</script>
<style scoped>
.no-check-address {
  position: relative;
  box-sizing: border-box;
  width: 460px;
  height: 240px;
  background: white;
  text-align: center;
  padding-top: 60px;
  padding-left: 40px;
  padding-right: 40px;
}
.no-check-address span {
  position: absolute;
  top: 17px;
  right: 17px;
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("../../assets/images/icon_close.png") no-repeat;
  cursor: pointer;
}
.wrap-text {
  width: 380px;
  height: 100px;
  display: table-cell;
  vertical-align: middle;
  margin: auto 0;
}
.no-check-address p {
  font-size: 16px;
  color: #333333;
}
.no-check-address button {
  width: 140px;
  height: 46px;
  background: #FF600A;
  border: none;
  font-size: 14px;
  color: #FFFFFF;
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
}
.no-check-address button:hover {
  background-color: #ff3c00;
}

</style>
